package com.sfx.controller;

import com.sfx.model.Dog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2022-12-02
 * Time: 16:45
 */
@Controller
public class DogA {

    @Autowired
    private Dog dog;

    public void doDog(){
        System.out.println("原数据 : " + dog);
        Dog dog2 = dog;
        dog2.setName("西老嘎");
        dog2.setAge(78);
        dog2.setId(3);
        System.out.println("新数据 : " + dog2);
    }

}
